package com.hg.onlineshop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hg.onlineshop.entity.Cart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CartMapper extends BaseMapper<Cart> {

    @Select("select * from cart_t c,product_t p where c.product_id = p.id and p.del_status = '0' and c.member_id = #{memberId}")
    List<Cart> selectCartItemByMemberId(@Param("memberId")Integer memberId);
}
